<nav class="navbar navbar-default" role="navigation">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-logo" href="{:U('Home/Index/index')}">
                <img src="__PUBLIC__/Home/images/oneplus/oneplus-logo.png" style="width: 100px;"/>
            </a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">

                <!--导航栏菜单项-->
                <think:nav name="nav">
                    <eq name="nav.pid" value="0">
                        <li>
                            <a href="{$nav.url|get_nav_url}" target="<eq name='nav.target' value='1'>_blank<else/>_self</eq>">{$nav.title}</a>
                        </li>
                    </eq>
                </think:nav>

            </ul>
            <ul class="nav navbar-nav navbar-right">
                <!--登录注册-->
                <if condition="is_login()">
                    <li class="dropdown">
                        <php>
                            $common_header_user = query_user(array('avatar32'));
                        </php>
                        <a href="#" class="dropdown-toggle dropdown-toggle-avatar" data-toggle="dropdown">
                            <img src="{$common_header_user['avatar32']}" class="navbar-avatar-img" style=""/>
                        </b></a>
                        <ul class="dropdown-menu">
                            <li><a href="{:U('UserCenter/Index/index')}">个人中心</a></li>
                            <li><a href="{:U('UserCenter/Index/changepassword')}">修改密码</a></li>
                            <li><a href="{:U('UserCenter/Index/logout')}">退出</a></li>
                        </ul>
                    </li>
                    <else/>
                    <li>
                        <a href="{:U('Home/User/login')}">登录</a>
                    </li>
                    <li>
                        <a href="{:U('Home/User/register')}">注册</a>
                    </li>
                </if>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
<a id="goTopBtn"></a>
